<!-- HTML header for doxygen 1.9.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>COMMONS-NET: commonsNet.ftp.FTPListParseEngine类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">COMMONS-NET
   </div>
  </td>
    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classcommonsNet_1_1ftp_1_1FTPListParseEngine.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pac-methods">包函数</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classcommonsNet_1_1ftp_1_1FTPListParseEngine-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">commonsNet.ftp.FTPListParseEngine类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>用于处理从服务器解析文件条目列表的整个过程。  
 <a href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#details">更多...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a62de2e2cfe8c29305cb24f94f8b461a6"><td class="memItemLeft" align="right" valign="top">public&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#a62de2e2cfe8c29305cb24f94f8b461a6">init</a> (parser: <a class="el" href="interfacecommonsNet_1_1ftp_1_1FTPFileEntryParser.html">FTPFileEntryParser</a>)</td></tr>
<tr class="memdesc:a62de2e2cfe8c29305cb24f94f8b461a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造与指定 FTPFileEntryParser相关的 FTPListParseEngine 对象实例。  <br /></td></tr>
<tr class="separator:a62de2e2cfe8c29305cb24f94f8b461a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7b4d6b668fd1f22a3775c487f22bc22"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#aa7b4d6b668fd1f22a3775c487f22bc22">getFileList</a> (fileFilter: (?<a class="el" href="classcommonsNet_1_1ftp_1_1FTPFile.html">FTPFile</a>) -&gt; Bool)</td></tr>
<tr class="memdesc:aa7b4d6b668fd1f22a3775c487f22bc22"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取一个包含服务器返回的所有文件列表的 FTPFile 对象列表。可以使用过滤器过滤条目。  <br /></td></tr>
<tr class="separator:aa7b4d6b668fd1f22a3775c487f22bc22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1133dfd518546ad407f8c8b93218c561"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#a1133dfd518546ad407f8c8b93218c561">getFiles</a> (): Array&lt;<a class="el" href="classcommonsNet_1_1ftp_1_1FTPFile.html">FTPFile</a>&gt;</td></tr>
<tr class="memdesc:a1133dfd518546ad407f8c8b93218c561"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取一个包含服务器返回的所有文件列表的 FTPFile 对象列表。  <br /></td></tr>
<tr class="separator:a1133dfd518546ad407f8c8b93218c561"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34b343a51225e5448a5a3a58085deabd"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#a34b343a51225e5448a5a3a58085deabd">getFiles</a> (filter: (?<a class="el" href="classcommonsNet_1_1ftp_1_1FTPFile.html">FTPFile</a>) -&gt; Bool): Array&lt;?<a class="el" href="classcommonsNet_1_1ftp_1_1FTPFile.html">FTPFile</a>&gt;</td></tr>
<tr class="memdesc:a34b343a51225e5448a5a3a58085deabd"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回一个FTPFile对象数组，其中包含服务器返回的文件列表，可能包含 None 成员。可以使用过滤器过滤条目。  <br /></td></tr>
<tr class="separator:a34b343a51225e5448a5a3a58085deabd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03c5069ac72a60e2600bb577b1c1747d"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#a03c5069ac72a60e2600bb577b1c1747d">getNext</a> (quantityRequested: Int64): Array&lt;?<a class="el" href="classcommonsNet_1_1ftp_1_1FTPFile.html">FTPFile</a>&gt;</td></tr>
<tr class="memdesc:a03c5069ac72a60e2600bb577b1c1747d"><td class="mdescLeft">&#160;</td><td class="mdescRight">从当前迭代器位置开始，返回最多 quantityRequested 个 FTPFile 对象的数组。  <br /></td></tr>
<tr class="separator:a03c5069ac72a60e2600bb577b1c1747d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4308aeeba62f73e45320d06c419dd511"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#a4308aeeba62f73e45320d06c419dd511">readServerList</a> (inputStream: InputStream): Unit</td></tr>
<tr class="memdesc:a4308aeeba62f73e45320d06c419dd511"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取服务器返回列表，并进行预处理。  <br /></td></tr>
<tr class="separator:a4308aeeba62f73e45320d06c419dd511"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7339a7cc13e0ebc9af0ee7b331197e5"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#ac7339a7cc13e0ebc9af0ee7b331197e5">resetIterator</a> (): Unit</td></tr>
<tr class="memdesc:ac7339a7cc13e0ebc9af0ee7b331197e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">将内部迭代器重置为列表的开头。  <br /></td></tr>
<tr class="separator:ac7339a7cc13e0ebc9af0ee7b331197e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pac-methods" name="pac-methods"></a>
包函数</h2></td></tr>
<tr class="memitem:a438348b5cc687ed569532dc73466e868"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#a438348b5cc687ed569532dc73466e868">init</a> (parser: <a class="el" href="interfacecommonsNet_1_1ftp_1_1FTPFileEntryParser.html">FTPFileEntryParser</a>, configuration: ?<a class="el" href="classcommonsNet_1_1ftp_1_1FTPClientConfig.html">FTPClientConfig</a>)</td></tr>
<tr class="memdesc:a438348b5cc687ed569532dc73466e868"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造函数，仅供FTPClient使用。  <br /></td></tr>
<tr class="separator:a438348b5cc687ed569532dc73466e868"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:a0c3d259aaf343f0fe3779763f8888d58"><td class="memItemLeft" align="right" valign="top">private func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#a0c3d259aaf343f0fe3779763f8888d58">read</a> (inputStream: InputStream): Unit</td></tr>
<tr class="memdesc:a0c3d259aaf343f0fe3779763f8888d58"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取输入到 <code><a class="el" href="">entries</a></code> 列表中。  <br /></td></tr>
<tr class="separator:a0c3d259aaf343f0fe3779763f8888d58"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:af5f4e0030315f32d3a538c4b189a5cc4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#af5f4e0030315f32d3a538c4b189a5cc4">static let EMPTY_FTP_FILE_ARRAY</a> : Array&lt;<a class="el" href="classcommonsNet_1_1ftp_1_1FTPFile.html">FTPFile</a>&gt; = []</td></tr>
<tr class="memdesc:af5f4e0030315f32d3a538c4b189a5cc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">空的不可变FTPFile数组。  <br /></td></tr>
<tr class="separator:af5f4e0030315f32d3a538c4b189a5cc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51e133f0d617ce3451273b946d6e29fb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#a51e133f0d617ce3451273b946d6e29fb">var entries</a> : LinkedList&lt;String&gt; = LinkedList&lt;String&gt;()</td></tr>
<tr class="memdesc:a51e133f0d617ce3451273b946d6e29fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">用于存储文件条目的列表  <br /></td></tr>
<tr class="separator:a51e133f0d617ce3451273b946d6e29fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb16ec49f4dbacac64a4b2c010744922"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#afb16ec49f4dbacac64a4b2c010744922">var internalIterator</a> = entries.iterator()</td></tr>
<tr class="memdesc:afb16ec49f4dbacac64a4b2c010744922"><td class="mdescLeft">&#160;</td><td class="mdescRight">内部迭代器，用于遍历文件条目列表  <br /></td></tr>
<tr class="separator:afb16ec49f4dbacac64a4b2c010744922"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4e6af1bf29f6580d54cc537518dc3d8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#ae4e6af1bf29f6580d54cc537518dc3d8">let parser</a> : <a class="el" href="interfacecommonsNet_1_1ftp_1_1FTPFileEntryParser.html">FTPFileEntryParser</a></td></tr>
<tr class="memdesc:ae4e6af1bf29f6580d54cc537518dc3d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">内部文件条目解析器  <br /></td></tr>
<tr class="separator:ae4e6af1bf29f6580d54cc537518dc3d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9f237b0aa4d57d2135a3fae765fe38d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html#af9f237b0aa4d57d2135a3fae765fe38d">let saveUnparseableEntries</a> : Bool</td></tr>
<tr class="memdesc:af9f237b0aa4d57d2135a3fae765fe38d"><td class="mdescLeft">&#160;</td><td class="mdescRight">如果为 true ，表示允许无效文件（解析失败的文件）的存在。  <br /></td></tr>
<tr class="separator:af9f237b0aa4d57d2135a3fae765fe38d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>用于处理从服务器解析文件条目列表的整个过程。 </p>
<p>它定义了两部分的解析机制。<br  />
 第一部分包括将原始输入读取到内部字符串列表中。列表中的每一项都对应一个实际的文件，所有由服务器发出的无关内容在这个阶段都会被删除。 这是通过与实例关联的 FTPFileEntryParser 来完成的。 通过调用它的以下方法来实现：<br  />
 readNextEntry() - 用于处理条目之间的分隔符，通常是换行符；<br  />
 preParse() - 用于处理无关内容，如列表的预处理行、版本控制系统上的重复项等。<br  />
 第二部分是由实际的解析组成，仍然与关联的 FTPFileEntryParser 有关。这由在内部字符串列表上的迭代器控制。 可以凭块模式的方式操作，通过调用 getNext() 和 getPrevious() 方法提供“分页”输出，一次返回整个列表的一部分；<br  />
 或者通过调用 getFiles() 方法返回整个列表。 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a62de2e2cfe8c29305cb24f94f8b461a6" name="a62de2e2cfe8c29305cb24f94f8b461a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62de2e2cfe8c29305cb24f94f8b461a6">&#9670;&#160;</a></span>init() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public commonsNet.ftp.FTPListParseEngine.init </td>
          <td>(</td>
          <td class="paramname"><em>parser</em>:&#160;</td>
          <td class="paramtype">FTPFileEntryParser</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造与指定 FTPFileEntryParser相关的 FTPListParseEngine 对象实例。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parser</td><td>与这个实例关联的文 FTPFileEntryParser </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a438348b5cc687ed569532dc73466e868" name="a438348b5cc687ed569532dc73466e868"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a438348b5cc687ed569532dc73466e868">&#9670;&#160;</a></span>init() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ftp.FTPListParseEngine.init </td>
          <td>(</td>
          <td class="paramname"><em>parser</em>:&#160;</td>
          <td class="paramtype">FTPFileEntryParser, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>configuration</em>:&#160;</td>
          <td class="paramtype">?FTPClientConfig&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">package</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>构造函数，仅供FTPClient使用。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parser</td><td>与这个引擎关联的 FTPFileEntryParser ，不能为空 </td></tr>
    <tr><td class="paramname">configuration</td><td>相关的 FTPClientConfig 对象，可以为空 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="aa7b4d6b668fd1f22a3775c487f22bc22" name="aa7b4d6b668fd1f22a3775c487f22bc22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7b4d6b668fd1f22a3775c487f22bc22">&#9670;&#160;</a></span>getFileList()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ftp.FTPListParseEngine.getFileList </td>
          <td>(</td>
          <td class="paramname"><em>fileFilter</em>:&#160;</td>
          <td class="paramtype">(?FTPFile) -&gt; Bool</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取一个包含服务器返回的所有文件列表的 FTPFile 对象列表。可以使用过滤器过滤条目。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">filter</td><td>给定的过滤条件 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>包含服务器返回的所有满足给定条件的文件列表的FTPFile对象列表。 @notic 如果某个文件列表解析失败，此数组可能包含 None 成员，调用者应该在引用它之前检查每个条目是否为 None ，或者使用不允许 None 条目的过滤器。 </dd></dl>

</div>
</div>
<a id="a1133dfd518546ad407f8c8b93218c561" name="a1133dfd518546ad407f8c8b93218c561"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1133dfd518546ad407f8c8b93218c561">&#9670;&#160;</a></span>getFiles() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ftp.FTPListParseEngine.getFiles </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Array&lt;<a class="el" href="classcommonsNet_1_1ftp_1_1FTPFile.html">FTPFile</a>&gt; </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取一个包含服务器返回的所有文件列表的 FTPFile 对象列表。 </p>
<dl class="section return"><dt>返回</dt><dd>一个FTPFile对象数组，包含服务器返回的文件列表，不会有任何空条目。</dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">NoneValueException</td><td>如果进行过滤器后条目中仍包含None，抛出异常。此异常永远不会抛出。 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a34b343a51225e5448a5a3a58085deabd" name="a34b343a51225e5448a5a3a58085deabd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34b343a51225e5448a5a3a58085deabd">&#9670;&#160;</a></span>getFiles() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ftp.FTPListParseEngine.getFiles </td>
          <td>(</td>
          <td class="paramname"><em>filter</em>:&#160;</td>
          <td class="paramtype">(?FTPFile) -&gt; Bool</td><td>)</td>
          <td>: Array&lt;?<a class="el" href="classcommonsNet_1_1ftp_1_1FTPFile.html">FTPFile</a>&gt; </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>返回一个FTPFile对象数组，其中包含服务器返回的文件列表，可能包含 None 成员。可以使用过滤器过滤条目。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">filter</td><td>给定的过滤条件</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>一个FTPFile对象数组，包含服务器返回的文件列表，可能包含 None 成员。 </dd></dl>

</div>
</div>
<a id="a03c5069ac72a60e2600bb577b1c1747d" name="a03c5069ac72a60e2600bb577b1c1747d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03c5069ac72a60e2600bb577b1c1747d">&#9670;&#160;</a></span>getNext()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ftp.FTPListParseEngine.getNext </td>
          <td>(</td>
          <td class="paramname"><em>quantityRequested</em>:&#160;</td>
          <td class="paramtype">Int64</td><td>)</td>
          <td>: Array&lt;?<a class="el" href="classcommonsNet_1_1ftp_1_1FTPFile.html">FTPFile</a>&gt; </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从当前迭代器位置开始，返回最多 quantityRequested 个 FTPFile 对象的数组。 </p>
<p>如果可用的文件数量少于 quantityRequested ，则返回的数组长度将等于列表中当前位置之后的元素数量。 如果没有找到这样的条目，则数组长度为0。<br  />
 在调用此方法后，此对象的内部迭代器将前进与返回数组大小相同的位置数。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">quantityRequested</td><td>想要获取的最大条目数。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>FTPFile对象数组。 @notic 如果某些文件列表无法解析，则此数组可能包含空成员。调用者应在引用每个条目之前检查它是否为空。 </dd></dl>

</div>
</div>
<a id="a0c3d259aaf343f0fe3779763f8888d58" name="a0c3d259aaf343f0fe3779763f8888d58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c3d259aaf343f0fe3779763f8888d58">&#9670;&#160;</a></span>read()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">private func commonsNet.ftp.FTPListParseEngine.read </td>
          <td>(</td>
          <td class="paramname"><em>inputStream</em>:&#160;</td>
          <td class="paramtype">InputStream</td><td>)</td>
          <td>: Unit </td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>读取输入到 <code><a class="el" href="">entries</a></code> 列表中。 </p>
<p>在此方法完成后，将在 entries 后加入从套接字流中读取的条目集合（但可能包含来自服务器输出的各种非条目预备行、重复项和其他数据，这些数据不会出现在最终列表中）， 数目由 <code><a class="el" href="">FTPFileEntryParser#readNextEntry()</a></code>确定。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputStream</td><td>将在其上读取输入的套接字流 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4308aeeba62f73e45320d06c419dd511" name="a4308aeeba62f73e45320d06c419dd511"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4308aeeba62f73e45320d06c419dd511">&#9670;&#160;</a></span>readServerList()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ftp.FTPListParseEngine.readServerList </td>
          <td>(</td>
          <td class="paramname"><em>inputStream</em>:&#160;</td>
          <td class="paramtype">InputStream</td><td>)</td>
          <td>: Unit </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>读取服务器返回列表，并进行预处理。 </p>
<p>在这个方法完成后， <code><a class="el" href="">entries</a></code> 存储了未解析的条目（字符串），每个条目代表着服务器上的一个唯一文件，并将内部迭代器置于列表开头。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputStream</td><td>服务器套接字提供的输入流，用于从服务器读取数据 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac7339a7cc13e0ebc9af0ee7b331197e5" name="ac7339a7cc13e0ebc9af0ee7b331197e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7339a7cc13e0ebc9af0ee7b331197e5">&#9670;&#160;</a></span>resetIterator()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ftp.FTPListParseEngine.resetIterator </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Unit </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>将内部迭代器重置为列表的开头。 </p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="ae4e6af1bf29f6580d54cc537518dc3d8" name="ae4e6af1bf29f6580d54cc537518dc3d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4e6af1bf29f6580d54cc537518dc3d8">&#9670;&#160;</a></span>let parser</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ftp.FTPListParseEngine.let parser : <a class="el" href="interfacecommonsNet_1_1ftp_1_1FTPFileEntryParser.html">FTPFileEntryParser</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>内部文件条目解析器 </p>

</div>
</div>
<a id="af9f237b0aa4d57d2135a3fae765fe38d" name="af9f237b0aa4d57d2135a3fae765fe38d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9f237b0aa4d57d2135a3fae765fe38d">&#9670;&#160;</a></span>let saveUnparseableEntries</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ftp.FTPListParseEngine.let saveUnparseableEntries : Bool</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>如果为 true ，表示允许无效文件（解析失败的文件）的存在。 </p>

</div>
</div>
<a id="af5f4e0030315f32d3a538c4b189a5cc4" name="af5f4e0030315f32d3a538c4b189a5cc4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5f4e0030315f32d3a538c4b189a5cc4">&#9670;&#160;</a></span>static let EMPTY_FTP_FILE_ARRAY</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ftp.FTPListParseEngine.static let EMPTY_FTP_FILE_ARRAY : Array&lt;<a class="el" href="classcommonsNet_1_1ftp_1_1FTPFile.html">FTPFile</a>&gt; = []</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>空的不可变FTPFile数组。 </p>

</div>
</div>
<a id="a51e133f0d617ce3451273b946d6e29fb" name="a51e133f0d617ce3451273b946d6e29fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51e133f0d617ce3451273b946d6e29fb">&#9670;&#160;</a></span>var entries</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ftp.FTPListParseEngine.var entries : LinkedList&lt;String&gt; = LinkedList&lt;String&gt;()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>用于存储文件条目的列表 </p>

</div>
</div>
<a id="afb16ec49f4dbacac64a4b2c010744922" name="afb16ec49f4dbacac64a4b2c010744922"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb16ec49f4dbacac64a4b2c010744922">&#9670;&#160;</a></span>var internalIterator</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ftp.FTPListParseEngine.var internalIterator = entries.iterator()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>内部迭代器，用于遍历文件条目列表 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>src/ftp/<a class="el" href="ftp__list__parser__engine_8cj.html">ftp_list_parser_engine.cj</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.9.6-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacecommonsNet.html">commonsNet</a></li><li class="navelem"><a class="el" href="namespacecommonsNet_1_1ftp.html">ftp</a></li><li class="navelem"><a class="el" href="classcommonsNet_1_1ftp_1_1FTPListParseEngine.html">FTPListParseEngine</a></li>
    <li class="footer">制作者 <img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
